RegistPanel={};
local this = RegistPanel;

function RegistPanel.new( )
    panelMgr:CreatePanel("Regist",nil);
end
function RegistPanel.OnCreate(go )
end
function RegistPanel.OnClick( )
    log(this.RegistName.text);
end
function RegistPanel.OnBack( )
    panelMgr:ClosePanel("Regist");
    LoginPanel.new();
end

function RegistPanel.Awake( go )
    log("RegistPanel.Awake");
    this.gameObject=go;
    this.transform=go.transform;
    local  behavior = this.transform:GetComponent('LuaBehaviour');

    this.RegistName=this.transform:Find("RegistName"):GetComponent('InputField');
    this.RegistWord=this.transform:Find("RegistWord"):GetComponent('InputField');

    this.RegistBtn=this.transform:Find("RegistBtn").gameObject;
    this.BackBtn=this.transform:Find("BackBtn").gameObject;
    behavior:AddClick(this.RegistBtn,this.OnClick);
    behavior:AddClick(this.BackBtn,this.OnBack);
end

-- function RegistPanel.Start()
--     log("RegistPanel.Start");
-- end